<?php
namespace app\admin\controller;
/**
 * 设备维修控制器
 */
class Repair extends AdminBase
{
    
    /**
     * 设备维修列表
     */
    public function repairList()
    {
        
        $this->assign('list', $this->logicRepair->getRepairList());
        
        return $this->fetch('repair_list');
    }
    
    /**
     * 设备维修列表添加
     */
    public function repairAdd()
    {
        
        IS_POST && $this->jump($this->logicRepair->repairEdit($this->param));
        
        return $this->fetch('repair_edit');
    }
    
    /**
     * 设备维修列表编辑
     */
    public function repairEdit()
    {
        
        IS_POST && $this->jump($this->logicRepair->repairEdit($this->param));
        
        $info = $this->logicRepair->getRepairInfo(['id' => $this->param['id']]);
        
        $this->assign('info', $info);
        
        return $this->fetch('repair_edit');
    }
    
    /**
     * 设备维修列表删除
     */
    public function repairDel($id = 0)
    {
        
        $this->jump($this->logicRepair->repairDel(['id' => $id]));
    }
}